﻿using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Xms.Abp.Application.Dtos;

namespace Xms.Abp.Application.Services;

public interface IXmsReadOnlyAppService<TEntityDto, TKey>
    : IXmsReadOnlyAppService<TEntityDto, TKey, PagedSortedAndFilterParameter>
    where TEntityDto : IEntityDto<TKey>
{
}

public interface IXmsReadOnlyAppService<TEntityDto, TKey, in TGetListInput>
    : IXmsReadOnlyAppService<TEntityDto, TEntityDto, TKey, TGetListInput>
    where TEntityDto : IEntityDto<TKey>
    where TGetListInput : class, IPagedAndSortedResultRequest
{
}

public interface IXmsReadOnlyAppService<TGetOutputDto, TGetListOutputDto, TKey, in TGetListInput>
    : IXmsReadOnlyAppService<TGetOutputDto, TGetListOutputDto, TGetOutputDto, TKey, TGetListInput>
    where TGetOutputDto : IEntityDto<TKey>
    where TGetListOutputDto : IEntityDto<TKey>
    where TGetListInput : class, IPagedAndSortedResultRequest
{
}

public interface IXmsReadOnlyAppService<TGetOutputDto, TGetListOutputDto, TExportDto, TKey, in TGetListInput>
    : IReadOnlyAppService<TGetOutputDto, TGetListOutputDto, TKey, TGetListInput>
    where TGetOutputDto : IEntityDto<TKey>
    where TGetListOutputDto : IEntityDto<TKey>
    where TGetListInput : class, IPagedAndSortedResultRequest
{
    Task<TGetOutputDto> GetAsync(string no);
    Task<(byte[], string)> ExportAsync(TGetListInput input);
    Task<List<NameValue<TKey>>> GetNameValuesAsync(string filter = null);
    Task<List<NameValue>> GetNameNosAsync(string filter = null);
}

